#ifndef MMFACADE_H
#define MMFACADE_H

#include <QObject>
#include <QHash>
#include "wfimporter.h"
#include "amimporter.h"
#include "amexporter.h"
#include "base/meshdata.h"

class AMMeshManager : public QObject
{
    Q_OBJECT
public:
    static AMMeshManager * get();
    ~AMMeshManager();
    MeshData * getMesh(const QString & meshName);
signals:
    void meshLoaded(const QString & meshName, MeshData * m);
public slots:
    void importOBJ(const QString & filename);
    void importAM(const QString & filename);
    void exportOBJ(const QString & meshName, const QString & filename);
    void exportAM(const QString & meshName, const QString & filename);
private:
    explicit AMMeshManager(QObject *parent = 0);
    int m_Count;
    QHash<QString, MeshData *> m_MeshData;
    WFImporter * m_WFImporter;
    AMImporter * m_AMImporter;
    AMExporter * m_AMExporter;
};

#endif // MMFACADE_H
